//
//  CinemaTableViewCell.m
//  UI_元旦豆瓣半完整版
//
//  Created by dllo on 16/1/1.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "CinemaTableViewCell.h"

#define WIDCH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height

@implementation CinemaTableViewCell

- (void)dealloc {
    [_addressLabel release];
    [_cinemaLabel release];
    [_telephoneLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatSubviews];
    }
    return self;
}

- (void)creatSubviews {
    self.addressLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_addressLabel];
    [_addressLabel release];
    
    self.cinemaLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_cinemaLabel];
    [_cinemaLabel release];
    
    self.telephoneLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_telephoneLabel];
    [_telephoneLabel release];
    
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    UIImageView *blueImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 25, WIDCH - 20, HEIGHT - 50)];
    blueImage.image = [UIImage imageNamed:@"bg_eventlistcell@2x.png"];
    [self.contentView addSubview:blueImage];
    
    _cinemaLabel.frame = CGRectMake(10, 5, WIDCH - 40, 50);
    [blueImage addSubview:_cinemaLabel];
    _cinemaLabel.font = [UIFont boldSystemFontOfSize:25];
    
    _addressLabel.frame = CGRectMake(10, 50, WIDCH - 40, 80);
    _addressLabel.numberOfLines = 5;
    [blueImage addSubview:_addressLabel];
    
    _telephoneLabel.frame = CGRectMake(10, 130, 300, 40);
    [blueImage addSubview:_telephoneLabel];

    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
